using System.Text;

namespace OracleInternal.SqlAndPlsqlParser.LocalParsing
{
	internal class OracleLpSequenceExpression : OracleLpSimpleExpression
	{
		protected OracleLpSequenceExpressionType m_vSequenceExpressionType;

		protected string m_vSequenceName;

		protected string m_vSchemaName;

		public OracleLpSequenceExpressionType SequenceExpressionType
		{
			get
			{
				return m_vSequenceExpressionType;
			}
			set
			{
				m_vSequenceExpressionType = value;
			}
		}

		public string SequenceName
		{
			get
			{
				return m_vSequenceName;
			}
			set
			{
				m_vSequenceName = value;
			}
		}

		public string SchemaName
		{
			get
			{
				return m_vSchemaName;
			}
			set
			{
				m_vSchemaName = value;
			}
		}

		public OracleLpSequenceExpression(OracleLpStatementElement parent)
			: base(parent)
		{
			m_vSimpleExpressionType = OracleLpSimpleExpressionType.SEQUENCE;
		}

		internal override void ToString(StringBuilder sb)
		{
			base.ToString(sb);
			sb.Append("  Schema: ").Append((m_vSchemaName == null) ? "none" : m_vSchemaName);
			sb.Append("  Sequence: ").Append(m_vSequenceName);
			sb.Append(".").Append(m_vSequenceExpressionType);
		}
	}
}
